<template>
  <div class="home">
    <h1>主基座</h1>
    <el-button type="primary" @click="increase">increase</el-button>{{num}}<el-button type="primary" @click="decrease">decrease</el-button>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'Home',
  components: {
    HelloWorld
  },
  computed: {
    num(){
      return this.$store.state.num
    }
  },
  methods: {
    increase(){
      this.$store.commit('increase')
    },
    decrease(){
      this.$store.commit('decrease')
    }
  }
}
</script>
